package com.itfitness.viewmodeldemo;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

/**
 * @ProjectName: ViewModelDemo
 * @Package: com.itfitness.viewmodeldemo
 * @ClassName: MyViewModel
 * @Description: java类作用描述
 * @Author: itfitness
 * @CreateDate: 2021/9/18 9:40
 * @UpdateUser: 更新者：
 * @UpdateDate: 2021/9/18 9:40
 * @UpdateRemark: 更新说明：
 */
public class MyViewModel extends ViewModel {
    private MutableLiveData<String> mName;

    public MutableLiveData<String> getName() {
        if(mName == null){
            mName = new MutableLiveData<>();
        }
        return mName;
    }

    @Override
    protected void onCleared() {
        super.onCleared();
    }
}
